<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.wanmait.movies.vo.Pager"%>
<%@page import="com.wanmait.movies.vo.Discuss"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%List<Discuss> allDiscuss = (List<Discuss>)request.getAttribute("allDiscuss");%>
<%

%>
	<%SimpleDateFormat aaa=new SimpleDateFormat("yyyy-MM-dd"); %>
	<span class="shuru">评论</span>
		<br>
		
			<%
			int a=0;
			
			for(Discuss discuss:allDiscuss){
				if(discuss.getReId()==0){
				%>
				<ul>
				<li class="pingluntarenli">
					<img class="touxiang"  src="/movies/images/<%=discuss.getUserId().getUserFaceimage()%>">
					<a href="/movies/TaRenServlet?action=userPage&uzi=<%=discuss.getUserId().getId()%>"><%=discuss.getUserId().getUserName() %></a>评论了电影
				</li>
				<li>
				<br>
				&emsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=(discuss.isHidden())?("该评论已屏蔽"):(discuss.getReMovieDiscuss())%>
				</li>
				<li>
					<%=aaa.format(discuss.getDiscussTime()) %>
					<input class="beipinglun" type="hidden" value="<%=discuss.getId()%>">
				&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript: void(0);" class="pingluntaren">评论</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" jubao="<%=discuss.getId() %>" class="jubao">举报</a>
				</li>
				<hr>
				</ul>
				
				<%
				}
				else{
					%>
					
						<ul>
				<li class="pingluntarenli" >
					<img class="touxiang"  src="/movies/images/<%=discuss.getUserId().getUserFaceimage()%>">
					<a href="/movies/TaRenServlet?action=userPage&uzi=<%=discuss.getUserId().getId()%>"><%=discuss.getUserId().getUserName() %></a>
					
					评论&nbsp;&nbsp;
					<div class="beipinglundiv" style="background-color:#cccccc">
						<a href="/movies/TaRenServlet?action=userPage&uzi=<%=discuss.getReUser().getId()%>"><%=discuss.getReUser().getUserName() %></a>:
						<span class="reDiscuss"><%=(discuss.isRehidden())?("该评论已屏蔽"):(discuss.getReMovieDiscuss()) %></span>
					</div>
					<br>
				</li>
				<li style="padding-left:34px;">
				<%=(discuss.isHidden())?("该评论已屏蔽"):(discuss.getMovieDiscuss())%>
				</li>
				<li>	
					
					<%=aaa.format(discuss.getDiscussTime())  %>
					<input class="beipinglun" type="hidden" value="<%=discuss.getId()%>">
					&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript: void(0);" class="pingluntaren">评论</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);"  jubao="<%=discuss.getId() %>" class="jubao">举报</a>
				</li>
				<hr>
				</ul>
				
					<%
				}
			} 
			Pager pager=(Pager)request.getAttribute("pager");
			
			%>
			<div  style="width:200px; margin:auto;"><a page="<%=pager.getCurrentPager() %>" class="previouPage" href="javascript:void(0);">上一页</a>&emsp;&emsp;&emsp;<a page="<%=pager.getCurrentPager()+1 %>" class="nextPage" href="javascript:void(0);">下一页</a></div>
	